package com.huafeng.model.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.huafeng.model.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * @author 花风
 * @date 2023/8/15 19:58
 * @Description 操作日志类
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel(description = "SysOperLog")
@TableName("sys_oper_log")
public class SysOperLog extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "模块标题")
    @TableField("title")
    @Excel(name = "模块标题",orderNum = "1",width = 10,isImportField = "true")
    private String title;

    @ApiModelProperty(value = "业务类型（0其它 1新增 2修改 3删除）")
    @TableField("business_type")
    @Excel(name = "业务类型",orderNum = "2",width = 5,isImportField = "true")
    private String businessType;

    @ApiModelProperty(value = "方法名称")
    @TableField("method")
    @Excel(name = "方法名称",orderNum = "3",width = 12,isImportField = "true")
    private String method;

    @ApiModelProperty(value = "请求方式")
    @TableField("request_method")
    @Excel(name = "请求方式",orderNum = "4",width = 5,isImportField = "true")
    private String requestMethod;

    @ApiModelProperty(value = "操作类别（0其它 1后台用户 2手机端用户）")
    @TableField("operator_type")
    @Excel(name = "操作类别",orderNum = "5",width = 5,isImportField = "true")
    private String operatorType;

    @ApiModelProperty(value = "操作人员")
    @TableField("oper_name")
    @Excel(name = "操作人员",orderNum = "6",width = 8,isImportField = "true")
    private String operName;

    @ApiModelProperty(value = "部门名称")
    @TableField("dept_name")
    private String deptName;

    @ApiModelProperty(value = "请求URL")
    @TableField("oper_url")
    @Excel(name = "请求url",orderNum = "7",width = 8,isImportField = "true")
    private String operUrl;

    @ApiModelProperty(value = "主机地址")
    @TableField("oper_ip")
    @Excel(name = "主机地址",orderNum = "8",width = 6,isImportField = "true")
    private String operIp;

    @ApiModelProperty(value = "请求参数")
    @TableField("oper_param")
    @Excel(name = "请求参数",orderNum = "9",width = 8,isImportField = "true")
    private String operParam;

    @ApiModelProperty(value = "返回参数")
    @TableField("json_result")
    @Excel(name = "返回参数",orderNum = "10",width = 8,isImportField = "true")
    private String jsonResult;

    @ApiModelProperty(value = "操作状态（0正常 1异常）")
    @TableField("status")
    @Excel(name = "操作状态",orderNum = "11",width = 2,isImportField = "true")
    private Integer status;

    @ApiModelProperty(value = "错误消息")
    @TableField("error_msg")
    @Excel(name = "错误信息",orderNum = "12",width = 5,isImportField = "true")
    private String errorMsg;

    @ApiModelProperty(value = "操作时间")
    @TableField("oper_time")
    private Date operTime;

    @Excel(name = "操作时间",orderNum = "13",format = "yyyy-MM-dd",width = 20,isImportField = "true")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createTime;

}